3.315 \(\int \frac {x^4 (a+b \log (c (d+e x)^n))^2}{f+g x^2} \, dx\)

Optimal. Leaf size=701 \[ \frac {2 b d^3 n \log (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )}{3 e^3 g}-\frac {2 b d^2 n (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )}{e^3 g}+\frac {b d n (d+e x)^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{e^3 g}-\frac {2 b n (d+e x)^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{9 e^3 g}-\frac {b (-f)^{3/2} n \text {Li}_2\left (-\frac {\sqrt {g} (d+e x)}{e \sqrt {-f}-d \sqrt {g}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^{5/2}}+\frac {b (-f)^{3/2} n \text {Li}_2\left (\frac {\sqrt {g} (d+e x)}{\sqrt {g} d+e \sqrt {-f}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^{5/2}}+\frac {(-f)^{3/2} \log \left (\frac {e \left (\sqrt {-f}-\sqrt {g} x\right )}{d \sqrt {g}+e \sqrt {-f}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 g^{5/2}}-\frac {(-f)^{3/2} \log \left (\frac {e \left (\sqrt {-f}+\sqrt {g} x\right )}{e \sqrt {-f}-d \sqrt {g}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 g^{5/2}}-\frac {f (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g^2}+\frac {x^3 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}+\frac {2 a b f n x}{g^2}+\frac {2 b^2 f n (d+e x) \log \left (c (d+e x)^n\right )}{e g^2}-\frac {b^2 d^3 n^2 \log ^2(d+e x)}{3 e^3 g}+\frac {2 b^2 d^2 n^2 x}{e^2 g}-\frac {b^2 d n^2 (d+e x)^2}{2 e^3 g}+\frac {2 b^2 n^2 (d+e x)^3}{27 e^3 g}+\frac {b^2 (-f)^{3/2} n^2 \text {Li}_3\left (-\frac {\sqrt {g} (d+e x)}{e \sqrt {-f}-d \sqrt {g}}\right )}{g^{5/2}}-\frac {b^2 (-f)^{3/2} n^2 \text {Li}_3\left (\frac {\sqrt {g} (d+e x)}{\sqrt {g} d+e \sqrt {-f}}\right )}{g^{5/2}}-\frac {2 b^2 f n^2 x}{g^2} \]

[Out]

2*a*b*f*n*x/g^2-2*b^2*f*n^2*x/g^2+2*b^2*d^2*n^2*x/e^2/g-1/2*b^2*d*n^2*(e*x+d)^2/e^3/g+2/27*b^2*n^2*(e*x+d)^3/e
^3/g-1/3*b^2*d^3*n^2*ln(e*x+d)^2/e^3/g+2*b^2*f*n*(e*x+d)*ln(c*(e*x+d)^n)/e/g^2-2*b*d^2*n*(e*x+d)*(a+b*ln(c*(e*
x+d)^n))/e^3/g+b*d*n*(e*x+d)^2*(a+b*ln(c*(e*x+d)^n))/e^3/g-2/9*b*n*(e*x+d)^3*(a+b*ln(c*(e*x+d)^n))/e^3/g+2/3*b
*d^3*n*ln(e*x+d)*(a+b*ln(c*(e*x+d)^n))/e^3/g+1/3*x^3*(a+b*ln(c*(e*x+d)^n))^2/g-f*(e*x+d)*(a+b*ln(c*(e*x+d)^n))
^2/e/g^2+1/2*(-f)^(3/2)*(a+b*ln(c*(e*x+d)^n))^2*ln(e*((-f)^(1/2)-x*g^(1/2))/(e*(-f)^(1/2)+d*g^(1/2)))/g^(5/2)-
1/2*(-f)^(3/2)*(a+b*ln(c*(e*x+d)^n))^2*ln(e*((-f)^(1/2)+x*g^(1/2))/(e*(-f)^(1/2)-d*g^(1/2)))/g^(5/2)-b*(-f)^(3
/2)*n*(a+b*ln(c*(e*x+d)^n))*polylog(2,-(e*x+d)*g^(1/2)/(e*(-f)^(1/2)-d*g^(1/2)))/g^(5/2)+b*(-f)^(3/2)*n*(a+b*l
n(c*(e*x+d)^n))*polylog(2,(e*x+d)*g^(1/2)/(e*(-f)^(1/2)+d*g^(1/2)))/g^(5/2)+b^2*(-f)^(3/2)*n^2*polylog(3,-(e*x
+d)*g^(1/2)/(e*(-f)^(1/2)-d*g^(1/2)))/g^(5/2)-b^2*(-f)^(3/2)*n^2*polylog(3,(e*x+d)*g^(1/2)/(e*(-f)^(1/2)+d*g^(
1/2)))/g^(5/2)

________________________________________________________________________________________

Rubi [A]  time = 0.92, antiderivative size = 646, normalized size of antiderivative = 0.92, number of steps used = 23, number of rules used = 16, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.552, Rules used = {2416, 2389, 2296, 2295, 2398, 2411, 43, 2334, 12, 14, 2301, 2409, 2396, 2433, 2374, 6589} \[ -\frac {b (-f)^{3/2} n \text {PolyLog}\left (2,-\frac {\sqrt {g} (d+e x)}{e \sqrt {-f}-d \sqrt {g}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^{5/2}}+\frac {b (-f)^{3/2} n \text {PolyLog}\left (2,\frac {\sqrt {g} (d+e x)}{d \sqrt {g}+e \sqrt {-f}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^{5/2}}+\frac {b^2 (-f)^{3/2} n^2 \text {PolyLog}\left (3,-\frac {\sqrt {g} (d+e x)}{e \sqrt {-f}-d \sqrt {g}}\right )}{g^{5/2}}-\frac {b^2 (-f)^{3/2} n^2 \text {PolyLog}\left (3,\frac {\sqrt {g} (d+e x)}{d \sqrt {g}+e \sqrt {-f}}\right )}{g^{5/2}}-\frac {b n \left (\frac {18 d^2 (d+e x)}{e^3}-\frac {6 d^3 \log (d+e x)}{e^3}-\frac {9 d (d+e x)^2}{e^3}+\frac {2 (d+e x)^3}{e^3}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{9 g}-\frac {f (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g^2}+\frac {(-f)^{3/2} \log \left (\frac {e \left (\sqrt {-f}-\sqrt {g} x\right )}{d \sqrt {g}+e \sqrt {-f}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 g^{5/2}}-\frac {(-f)^{3/2} \log \left (\frac {e \left (\sqrt {-f}+\sqrt {g} x\right )}{e \sqrt {-f}-d \sqrt {g}}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 g^{5/2}}+\frac {x^3 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}+\frac {2 a b f n x}{g^2}+\frac {2 b^2 f n (d+e x) \log \left (c (d+e x)^n\right )}{e g^2}+\frac {2 b^2 d^2 n^2 x}{e^2 g}-\frac {b^2 d^3 n^2 \log ^2(d+e x)}{3 e^3 g}-\frac {b^2 d n^2 (d+e x)^2}{2 e^3 g}+\frac {2 b^2 n^2 (d+e x)^3}{27 e^3 g}-\frac {2 b^2 f n^2 x}{g^2} \]

Antiderivative was successfully verified.

[In]

Int[(x^4*(a + b*Log[c*(d + e*x)^n])^2)/(f + g*x^2),x]

[Out]

(2*a*b*f*n*x)/g^2 - (2*b^2*f*n^2*x)/g^2 + (2*b^2*d^2*n^2*x)/(e^2*g) - (b^2*d*n^2*(d + e*x)^2)/(2*e^3*g) + (2*b
^2*n^2*(d + e*x)^3)/(27*e^3*g) - (b^2*d^3*n^2*Log[d + e*x]^2)/(3*e^3*g) + (2*b^2*f*n*(d + e*x)*Log[c*(d + e*x)
^n])/(e*g^2) - (b*n*((18*d^2*(d + e*x))/e^3 - (9*d*(d + e*x)^2)/e^3 + (2*(d + e*x)^3)/e^3 - (6*d^3*Log[d + e*x
])/e^3)*(a + b*Log[c*(d + e*x)^n]))/(9*g) + (x^3*(a + b*Log[c*(d + e*x)^n])^2)/(3*g) - (f*(d + e*x)*(a + b*Log
[c*(d + e*x)^n])^2)/(e*g^2) + ((-f)^(3/2)*(a + b*Log[c*(d + e*x)^n])^2*Log[(e*(Sqrt[-f] - Sqrt[g]*x))/(e*Sqrt[
-f] + d*Sqrt[g])])/(2*g^(5/2)) - ((-f)^(3/2)*(a + b*Log[c*(d + e*x)^n])^2*Log[(e*(Sqrt[-f] + Sqrt[g]*x))/(e*Sq
rt[-f] - d*Sqrt[g])])/(2*g^(5/2)) - (b*(-f)^(3/2)*n*(a + b*Log[c*(d + e*x)^n])*PolyLog[2, -((Sqrt[g]*(d + e*x)
)/(e*Sqrt[-f] - d*Sqrt[g]))])/g^(5/2) + (b*(-f)^(3/2)*n*(a + b*Log[c*(d + e*x)^n])*PolyLog[2, (Sqrt[g]*(d + e*
x))/(e*Sqrt[-f] + d*Sqrt[g])])/g^(5/2) + (b^2*(-f)^(3/2)*n^2*PolyLog[3, -((Sqrt[g]*(d + e*x))/(e*Sqrt[-f] - d*
Sqrt[g]))])/g^(5/2) - (b^2*(-f)^(3/2)*n^2*PolyLog[3, (Sqrt[g]*(d + e*x))/(e*Sqrt[-f] + d*Sqrt[g])])/g^(5/2)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2296

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2334

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rule 2374

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> -Sim
p[(PolyLog[2, -(d*f*x^m)]*(a + b*Log[c*x^n])^p)/m, x] + Dist[(b*n*p)/m, Int[(PolyLog[2, -(d*f*x^m)]*(a + b*Log
[c*x^n])^(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 2389

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2396

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[(Log[(e*
(f + g*x))/(e*f - d*g)]*(a + b*Log[c*(d + e*x)^n])^p)/g, x] - Dist[(b*e*n*p)/g, Int[(Log[(e*(f + g*x))/(e*f -
d*g)]*(a + b*Log[c*(d + e*x)^n])^(p - 1))/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && NeQ[e*
f - d*g, 0] && IGtQ[p, 1]

Rule 2398

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((
f + g*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n])^p)/(g*(q + 1)), x] - Dist[(b*e*n*p)/(g*(q + 1)), Int[((f + g*x)^(q
 + 1)*(a + b*Log[c*(d + e*x)^n])^(p - 1))/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*
f - d*g, 0] && GtQ[p, 0] && NeQ[q, -1] && IntegersQ[2*p, 2*q] && ( !IGtQ[q, 0] || (EqQ[p, 2] && NeQ[q, 1]))

Rule 2409

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_.)*(x_)^(r_))^(q_.), x_Symbol] :> In
t[ExpandIntegrand[(a + b*Log[c*(d + e*x)^n])^p, (f + g*x^r)^q, x], x] /; FreeQ[{a, b, c, d, e, f, g, n, r}, x]
 && IGtQ[p, 0] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[r] && NeQ[r, 1]))

Rule 2411

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[((g*x)/e)^q*((e*h - d*i)/e + (i*x)/e)^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rule 2416

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((h_.)*(x_))^(m_.)*((f_) + (g_.)*(x_)^(r_.))^(q
_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*Log[c*(d + e*x)^n])^p, (h*x)^m*(f + g*x^r)^q, x], x] /; FreeQ[{a,
 b, c, d, e, f, g, h, m, n, p, q, r}, x] && IntegerQ[m] && IntegerQ[q]

Rule 2433

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + Log[(h_.)*((i_.) + (j_.)*(x_))^(m_.)]*
(g_.))*((k_.) + (l_.)*(x_))^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[((k*x)/d)^r*(a + b*Log[c*x^n])^p*(f + g*Lo
g[h*((e*i - d*j)/e + (j*x)/e)^m]), x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, j, k, l, n, p, r},
 x] && EqQ[e*k - d*l, 0]

Rule 6589

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin {align*} \int \frac {x^4 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{f+g x^2} \, dx &=\int \left (-\frac {f \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{g^2}+\frac {x^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{g}+\frac {f^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{g^2 \left (f+g x^2\right )}\right ) \, dx\\ &=-\frac {f \int \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \, dx}{g^2}+\frac {f^2 \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{f+g x^2} \, dx}{g^2}+\frac {\int x^2 \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \, dx}{g}\\ &=\frac {x^3 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}-\frac {f \operatorname {Subst}\left (\int \left (a+b \log \left (c x^n\right )\right )^2 \, dx,x,d+e x\right )}{e g^2}+\frac {f^2 \int \left (\frac {\sqrt {-f} \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 f \left (\sqrt {-f}-\sqrt {g} x\right )}+\frac {\sqrt {-f} \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{2 f \left (\sqrt {-f}+\sqrt {g} x\right )}\right ) \, dx}{g^2}-\frac {(2 b e n) \int \frac {x^3 \left (a+b \log \left (c (d+e x)^n\right )\right )}{d+e x} \, dx}{3 g}\\ &=\frac {x^3 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}-\frac {f (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g^2}-\frac {(-f)^{3/2} \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{\sqrt {-f}-\sqrt {g} x} \, dx}{2 g^2}-\frac {(-f)^{3/2} \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{\sqrt {-f}+\sqrt {g} x} \, dx}{2 g^2}+\frac {(2 b f n) \operatorname {Subst}\left (\int \left (a+b \log \left (c x^n\right )\right ) \, dx,x,d+e x\right )}{e g^2}-\frac {(2 b n) \operatorname {Subst}\left (\int \frac {\left (-\frac {d}{e}+\frac {x}{e}\right )^3 \left (a+b \log \left (c x^n\right )\right )}{x} \, dx,x,d+e x\right )}{3 g}\\ &=\frac {2 a b f n x}{g^2}-\frac {b n \left (\frac {18 d^2 (d+e x)}{e^3}-\frac {9 d (d+e x)^2}{e^3}+\frac {2 (d+e x)^3}{e^3}-\frac {6 d^3 \log (d+e x)}{e^3}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{9 g}+\frac {x^3 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}-\frac {f (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g^2}+\frac {(-f)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac {e \left (\sqrt {-f}-\sqrt {g} x\right )}{e \sqrt {-f}+d \sqrt {g}}\right )}{2 g^{5/2}}-\frac {(-f)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac {e \left (\sqrt {-f}+\sqrt {g} x\right )}{e \sqrt {-f}-d \sqrt {g}}\right )}{2 g^{5/2}}-\frac {\left (b e (-f)^{3/2} n\right ) \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e \left (\sqrt {-f}-\sqrt {g} x\right )}{e \sqrt {-f}+d \sqrt {g}}\right )}{d+e x} \, dx}{g^{5/2}}+\frac {\left (b e (-f)^{3/2} n\right ) \int \frac {\left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e \left (\sqrt {-f}+\sqrt {g} x\right )}{e \sqrt {-f}-d \sqrt {g}}\right )}{d+e x} \, dx}{g^{5/2}}+\frac {\left (2 b^2 f n\right ) \operatorname {Subst}\left (\int \log \left (c x^n\right ) \, dx,x,d+e x\right )}{e g^2}+\frac {\left (2 b^2 n^2\right ) \operatorname {Subst}\left (\int \frac {18 d^2 x-9 d x^2+2 x^3-6 d^3 \log (x)}{6 e^3 x} \, dx,x,d+e x\right )}{3 g}\\ &=\frac {2 a b f n x}{g^2}-\frac {2 b^2 f n^2 x}{g^2}+\frac {2 b^2 f n (d+e x) \log \left (c (d+e x)^n\right )}{e g^2}-\frac {b n \left (\frac {18 d^2 (d+e x)}{e^3}-\frac {9 d (d+e x)^2}{e^3}+\frac {2 (d+e x)^3}{e^3}-\frac {6 d^3 \log (d+e x)}{e^3}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{9 g}+\frac {x^3 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}-\frac {f (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g^2}+\frac {(-f)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac {e \left (\sqrt {-f}-\sqrt {g} x\right )}{e \sqrt {-f}+d \sqrt {g}}\right )}{2 g^{5/2}}-\frac {(-f)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac {e \left (\sqrt {-f}+\sqrt {g} x\right )}{e \sqrt {-f}-d \sqrt {g}}\right )}{2 g^{5/2}}-\frac {\left (b (-f)^{3/2} n\right ) \operatorname {Subst}\left (\int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (\frac {e \left (\frac {e \sqrt {-f}+d \sqrt {g}}{e}-\frac {\sqrt {g} x}{e}\right )}{e \sqrt {-f}+d \sqrt {g}}\right )}{x} \, dx,x,d+e x\right )}{g^{5/2}}+\frac {\left (b (-f)^{3/2} n\right ) \operatorname {Subst}\left (\int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (\frac {e \left (\frac {e \sqrt {-f}-d \sqrt {g}}{e}+\frac {\sqrt {g} x}{e}\right )}{e \sqrt {-f}-d \sqrt {g}}\right )}{x} \, dx,x,d+e x\right )}{g^{5/2}}+\frac {\left (b^2 n^2\right ) \operatorname {Subst}\left (\int \frac {18 d^2 x-9 d x^2+2 x^3-6 d^3 \log (x)}{x} \, dx,x,d+e x\right )}{9 e^3 g}\\ &=\frac {2 a b f n x}{g^2}-\frac {2 b^2 f n^2 x}{g^2}+\frac {2 b^2 f n (d+e x) \log \left (c (d+e x)^n\right )}{e g^2}-\frac {b n \left (\frac {18 d^2 (d+e x)}{e^3}-\frac {9 d (d+e x)^2}{e^3}+\frac {2 (d+e x)^3}{e^3}-\frac {6 d^3 \log (d+e x)}{e^3}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{9 g}+\frac {x^3 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}-\frac {f (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g^2}+\frac {(-f)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac {e \left (\sqrt {-f}-\sqrt {g} x\right )}{e \sqrt {-f}+d \sqrt {g}}\right )}{2 g^{5/2}}-\frac {(-f)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac {e \left (\sqrt {-f}+\sqrt {g} x\right )}{e \sqrt {-f}-d \sqrt {g}}\right )}{2 g^{5/2}}-\frac {b (-f)^{3/2} n \left (a+b \log \left (c (d+e x)^n\right )\right ) \text {Li}_2\left (-\frac {\sqrt {g} (d+e x)}{e \sqrt {-f}-d \sqrt {g}}\right )}{g^{5/2}}+\frac {b (-f)^{3/2} n \left (a+b \log \left (c (d+e x)^n\right )\right ) \text {Li}_2\left (\frac {\sqrt {g} (d+e x)}{e \sqrt {-f}+d \sqrt {g}}\right )}{g^{5/2}}+\frac {\left (b^2 (-f)^{3/2} n^2\right ) \operatorname {Subst}\left (\int \frac {\text {Li}_2\left (-\frac {\sqrt {g} x}{e \sqrt {-f}-d \sqrt {g}}\right )}{x} \, dx,x,d+e x\right )}{g^{5/2}}-\frac {\left (b^2 (-f)^{3/2} n^2\right ) \operatorname {Subst}\left (\int \frac {\text {Li}_2\left (\frac {\sqrt {g} x}{e \sqrt {-f}+d \sqrt {g}}\right )}{x} \, dx,x,d+e x\right )}{g^{5/2}}+\frac {\left (b^2 n^2\right ) \operatorname {Subst}\left (\int \left (18 d^2-9 d x+2 x^2-\frac {6 d^3 \log (x)}{x}\right ) \, dx,x,d+e x\right )}{9 e^3 g}\\ &=\frac {2 a b f n x}{g^2}-\frac {2 b^2 f n^2 x}{g^2}+\frac {2 b^2 d^2 n^2 x}{e^2 g}-\frac {b^2 d n^2 (d+e x)^2}{2 e^3 g}+\frac {2 b^2 n^2 (d+e x)^3}{27 e^3 g}+\frac {2 b^2 f n (d+e x) \log \left (c (d+e x)^n\right )}{e g^2}-\frac {b n \left (\frac {18 d^2 (d+e x)}{e^3}-\frac {9 d (d+e x)^2}{e^3}+\frac {2 (d+e x)^3}{e^3}-\frac {6 d^3 \log (d+e x)}{e^3}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{9 g}+\frac {x^3 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}-\frac {f (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g^2}+\frac {(-f)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac {e \left (\sqrt {-f}-\sqrt {g} x\right )}{e \sqrt {-f}+d \sqrt {g}}\right )}{2 g^{5/2}}-\frac {(-f)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac {e \left (\sqrt {-f}+\sqrt {g} x\right )}{e \sqrt {-f}-d \sqrt {g}}\right )}{2 g^{5/2}}-\frac {b (-f)^{3/2} n \left (a+b \log \left (c (d+e x)^n\right )\right ) \text {Li}_2\left (-\frac {\sqrt {g} (d+e x)}{e \sqrt {-f}-d \sqrt {g}}\right )}{g^{5/2}}+\frac {b (-f)^{3/2} n \left (a+b \log \left (c (d+e x)^n\right )\right ) \text {Li}_2\left (\frac {\sqrt {g} (d+e x)}{e \sqrt {-f}+d \sqrt {g}}\right )}{g^{5/2}}+\frac {b^2 (-f)^{3/2} n^2 \text {Li}_3\left (-\frac {\sqrt {g} (d+e x)}{e \sqrt {-f}-d \sqrt {g}}\right )}{g^{5/2}}-\frac {b^2 (-f)^{3/2} n^2 \text {Li}_3\left (\frac {\sqrt {g} (d+e x)}{e \sqrt {-f}+d \sqrt {g}}\right )}{g^{5/2}}-\frac {\left (2 b^2 d^3 n^2\right ) \operatorname {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,d+e x\right )}{3 e^3 g}\\ &=\frac {2 a b f n x}{g^2}-\frac {2 b^2 f n^2 x}{g^2}+\frac {2 b^2 d^2 n^2 x}{e^2 g}-\frac {b^2 d n^2 (d+e x)^2}{2 e^3 g}+\frac {2 b^2 n^2 (d+e x)^3}{27 e^3 g}-\frac {b^2 d^3 n^2 \log ^2(d+e x)}{3 e^3 g}+\frac {2 b^2 f n (d+e x) \log \left (c (d+e x)^n\right )}{e g^2}-\frac {b n \left (\frac {18 d^2 (d+e x)}{e^3}-\frac {9 d (d+e x)^2}{e^3}+\frac {2 (d+e x)^3}{e^3}-\frac {6 d^3 \log (d+e x)}{e^3}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{9 g}+\frac {x^3 \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{3 g}-\frac {f (d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{e g^2}+\frac {(-f)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac {e \left (\sqrt {-f}-\sqrt {g} x\right )}{e \sqrt {-f}+d \sqrt {g}}\right )}{2 g^{5/2}}-\frac {(-f)^{3/2} \left (a+b \log \left (c (d+e x)^n\right )\right )^2 \log \left (\frac {e \left (\sqrt {-f}+\sqrt {g} x\right )}{e \sqrt {-f}-d \sqrt {g}}\right )}{2 g^{5/2}}-\frac {b (-f)^{3/2} n \left (a+b \log \left (c (d+e x)^n\right )\right ) \text {Li}_2\left (-\frac {\sqrt {g} (d+e x)}{e \sqrt {-f}-d \sqrt {g}}\right )}{g^{5/2}}+\frac {b (-f)^{3/2} n \left (a+b \log \left (c (d+e x)^n\right )\right ) \text {Li}_2\left (\frac {\sqrt {g} (d+e x)}{e \sqrt {-f}+d \sqrt {g}}\right )}{g^{5/2}}+\frac {b^2 (-f)^{3/2} n^2 \text {Li}_3\left (-\frac {\sqrt {g} (d+e x)}{e \sqrt {-f}-d \sqrt {g}}\right )}{g^{5/2}}-\frac {b^2 (-f)^{3/2} n^2 \text {Li}_3\left (\frac {\sqrt {g} (d+e x)}{e \sqrt {-f}+d \sqrt {g}}\right )}{g^{5/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 1.00, size = 821, normalized size = 1.17 \[ \frac {18 g^{3/2} x^3 \left (a-b n \log (d+e x)+b \log \left (c (d+e x)^n\right )\right )^2 e^3-54 f \sqrt {g} x \left (a-b n \log (d+e x)+b \log \left (c (d+e x)^n\right )\right )^2 e^3+54 f^{3/2} \tan ^{-1}\left (\frac {\sqrt {g} x}{\sqrt {f}}\right ) \left (a-b n \log (d+e x)+b \log \left (c (d+e x)^n\right )\right )^2 e^3+6 b n \left (a-b n \log (d+e x)+b \log \left (c (d+e x)^n\right )\right ) \left (9 i f^{3/2} \left (\log (d+e x) \log \left (1-\frac {\sqrt {g} (d+e x)}{d \sqrt {g}-i e \sqrt {f}}\right )+\text {Li}_2\left (\frac {\sqrt {g} (d+e x)}{d \sqrt {g}-i e \sqrt {f}}\right )\right ) e^3-9 i f^{3/2} \left (\log (d+e x) \log \left (1-\frac {\sqrt {g} (d+e x)}{\sqrt {g} d+i e \sqrt {f}}\right )+\text {Li}_2\left (\frac {\sqrt {g} (d+e x)}{\sqrt {g} d+i e \sqrt {f}}\right )\right ) e^3-18 f \sqrt {g} (d+e x) (\log (d+e x)-1) e^2+g^{3/2} \left (e x \left (-6 d^2+3 e x d-2 e^2 x^2\right )+6 \left (d^3+e^3 x^3\right ) \log (d+e x)\right )\right )+b^2 n^2 \left (27 i f^{3/2} \left (\log \left (1-\frac {\sqrt {g} (d+e x)}{d \sqrt {g}-i e \sqrt {f}}\right ) \log ^2(d+e x)+2 \text {Li}_2\left (\frac {\sqrt {g} (d+e x)}{d \sqrt {g}-i e \sqrt {f}}\right ) \log (d+e x)-2 \text {Li}_3\left (\frac {\sqrt {g} (d+e x)}{d \sqrt {g}-i e \sqrt {f}}\right )\right ) e^3-27 i f^{3/2} \left (\log \left (1-\frac {\sqrt {g} (d+e x)}{\sqrt {g} d+i e \sqrt {f}}\right ) \log ^2(d+e x)+2 \text {Li}_2\left (\frac {\sqrt {g} (d+e x)}{\sqrt {g} d+i e \sqrt {f}}\right ) \log (d+e x)-2 \text {Li}_3\left (\frac {\sqrt {g} (d+e x)}{\sqrt {g} d+i e \sqrt {f}}\right )\right ) e^3-54 f \sqrt {g} \left ((d+e x) \log ^2(d+e x)-2 (d+e x) \log (d+e x)+2 e x\right ) e^2+g^{3/2} \left (18 \left (d^3+e^3 x^3\right ) \log ^2(d+e x)-6 \left (11 d^3+6 e x d^2-3 e^2 x^2 d+2 e^3 x^3\right ) \log (d+e x)+e x \left (66 d^2-15 e x d+4 e^2 x^2\right )\right )\right )}{54 e^3 g^{5/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[(x^4*(a + b*Log[c*(d + e*x)^n])^2)/(f + g*x^2),x]

[Out]

(-54*e^3*f*Sqrt[g]*x*(a - b*n*Log[d + e*x] + b*Log[c*(d + e*x)^n])^2 + 18*e^3*g^(3/2)*x^3*(a - b*n*Log[d + e*x
] + b*Log[c*(d + e*x)^n])^2 + 54*e^3*f^(3/2)*ArcTan[(Sqrt[g]*x)/Sqrt[f]]*(a - b*n*Log[d + e*x] + b*Log[c*(d +
e*x)^n])^2 + 6*b*n*(a - b*n*Log[d + e*x] + b*Log[c*(d + e*x)^n])*(-18*e^2*f*Sqrt[g]*(d + e*x)*(-1 + Log[d + e*
x]) + g^(3/2)*(e*x*(-6*d^2 + 3*d*e*x - 2*e^2*x^2) + 6*(d^3 + e^3*x^3)*Log[d + e*x]) + (9*I)*e^3*f^(3/2)*(Log[d
 + e*x]*Log[1 - (Sqrt[g]*(d + e*x))/((-I)*e*Sqrt[f] + d*Sqrt[g])] + PolyLog[2, (Sqrt[g]*(d + e*x))/((-I)*e*Sqr
t[f] + d*Sqrt[g])]) - (9*I)*e^3*f^(3/2)*(Log[d + e*x]*Log[1 - (Sqrt[g]*(d + e*x))/(I*e*Sqrt[f] + d*Sqrt[g])] +
 PolyLog[2, (Sqrt[g]*(d + e*x))/(I*e*Sqrt[f] + d*Sqrt[g])])) + b^2*n^2*(-54*e^2*f*Sqrt[g]*(2*e*x - 2*(d + e*x)
*Log[d + e*x] + (d + e*x)*Log[d + e*x]^2) + g^(3/2)*(e*x*(66*d^2 - 15*d*e*x + 4*e^2*x^2) - 6*(11*d^3 + 6*d^2*e
*x - 3*d*e^2*x^2 + 2*e^3*x^3)*Log[d + e*x] + 18*(d^3 + e^3*x^3)*Log[d + e*x]^2) + (27*I)*e^3*f^(3/2)*(Log[d +
e*x]^2*Log[1 - (Sqrt[g]*(d + e*x))/((-I)*e*Sqrt[f] + d*Sqrt[g])] + 2*Log[d + e*x]*PolyLog[2, (Sqrt[g]*(d + e*x
))/((-I)*e*Sqrt[f] + d*Sqrt[g])] - 2*PolyLog[3, (Sqrt[g]*(d + e*x))/((-I)*e*Sqrt[f] + d*Sqrt[g])]) - (27*I)*e^
3*f^(3/2)*(Log[d + e*x]^2*Log[1 - (Sqrt[g]*(d + e*x))/(I*e*Sqrt[f] + d*Sqrt[g])] + 2*Log[d + e*x]*PolyLog[2, (
Sqrt[g]*(d + e*x))/(I*e*Sqrt[f] + d*Sqrt[g])] - 2*PolyLog[3, (Sqrt[g]*(d + e*x))/(I*e*Sqrt[f] + d*Sqrt[g])])))
/(54*e^3*g^(5/2))

________________________________________________________________________________________

fricas [F]  time = 0.44, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {b^{2} x^{4} \log \left ({\left (e x + d\right )}^{n} c\right )^{2} + 2 \, a b x^{4} \log \left ({\left (e x + d\right )}^{n} c\right ) + a^{2} x^{4}}{g x^{2} + f}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^4*(a+b*log(c*(e*x+d)^n))^2/(g*x^2+f),x, algorithm="fricas")

[Out]

integral((b^2*x^4*log((e*x + d)^n*c)^2 + 2*a*b*x^4*log((e*x + d)^n*c) + a^2*x^4)/(g*x^2 + f), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}^{2} x^{4}}{g x^{2} + f}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^4*(a+b*log(c*(e*x+d)^n))^2/(g*x^2+f),x, algorithm="giac")

[Out]

integrate((b*log((e*x + d)^n*c) + a)^2*x^4/(g*x^2 + f), x)

________________________________________________________________________________________

maple [F]  time = 29.08, size = 0, normalized size = 0.00 \[ \int \frac {\left (b \ln \left (c \left (e x +d \right )^{n}\right )+a \right )^{2} x^{4}}{g \,x^{2}+f}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^4*(b*ln(c*(e*x+d)^n)+a)^2/(g*x^2+f),x)

[Out]

int(x^4*(b*ln(c*(e*x+d)^n)+a)^2/(g*x^2+f),x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {1}{3} \, a^{2} {\left (\frac {3 \, f^{2} \arctan \left (\frac {g x}{\sqrt {f g}}\right )}{\sqrt {f g} g^{2}} + \frac {g x^{3} - 3 \, f x}{g^{2}}\right )} + \int \frac {b^{2} x^{4} \log \left ({\left (e x + d\right )}^{n}\right )^{2} + 2 \, {\left (b^{2} \log \relax (c) + a b\right )} x^{4} \log \left ({\left (e x + d\right )}^{n}\right ) + {\left (b^{2} \log \relax (c)^{2} + 2 \, a b \log \relax (c)\right )} x^{4}}{g x^{2} + f}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^4*(a+b*log(c*(e*x+d)^n))^2/(g*x^2+f),x, algorithm="maxima")

[Out]

1/3*a^2*(3*f^2*arctan(g*x/sqrt(f*g))/(sqrt(f*g)*g^2) + (g*x^3 - 3*f*x)/g^2) + integrate((b^2*x^4*log((e*x + d)
^n)^2 + 2*(b^2*log(c) + a*b)*x^4*log((e*x + d)^n) + (b^2*log(c)^2 + 2*a*b*log(c))*x^4)/(g*x^2 + f), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {x^4\,{\left (a+b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )\right )}^2}{g\,x^2+f} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^4*(a + b*log(c*(d + e*x)^n))^2)/(f + g*x^2),x)

[Out]

int((x^4*(a + b*log(c*(d + e*x)^n))^2)/(f + g*x^2), x)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**4*(a+b*ln(c*(e*x+d)**n))**2/(g*x**2+f),x)

[Out]

Timed out

________________________________________________________________________________________